package edu.ar.bases.dvdstore.domainmodel.repositories;

import java.util.Collection;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import edu.ar.bases.dvdstore.domainmodel.entities.Domicilio;
import edu.ar.bases.dvdstore.domainmodel.repositories.interfaces.IDomicilioRepository;

public class DomicilioRepository extends HibernateDaoSupport implements IDomicilioRepository {
	
	public DomicilioRepository() {
		super();
	}

	public Collection<Domicilio> findAll()
	{
		return this.getHibernateTemplate().loadAll(Domicilio.class);
	}

	
	public void save(Domicilio entity)
	{
		this.getHibernateTemplate().save(entity);
	}
	
	
	public Domicilio findById(Integer domicilioID)
	{
		return (Domicilio)this.getHibernateTemplate().get(Domicilio.class, domicilioID);
	}
}
